feat: Add Webhook Reliability Architect kit - #334
Conversation
:robot_face: AgentKit Structural ValidationNew Contributions Detected
Check Results
🎉 All checks passed! This contribution follows the AgentKit structure. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI (base), Organization UI (inherited) Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
WalkthroughChangesThe pull request adds a Webhook Reliability Architect kit. It includes a Lamatic flow, structured reliability reports, deterministic and live analysis paths, and a Next.js interface for scenario input and report review. Webhook Reliability Architect
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 8
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@kits/webhook-reliability-architect/apps/.gitignore`:
- Around line 1-2: Update the ignore patterns in the repository’s .gitignore so
all environment files matching .env* are ignored, including production and local
variants, while explicitly unignoring .env.example.
In `@kits/webhook-reliability-architect/apps/actions/orchestrate.ts`:
- Around line 11-26: Harden validateScenario to reject non-object payloads
before property access, then validate every WebhookScenario field for the
expected string, enum, boolean, finite-integer, and size constraints before the
action generates a report or executes the flow. Explicitly reject NaN and other
non-finite numeric values, and return the existing validation-error shape rather
than throwing for malformed requests.
- Around line 29-64: Expand isReliabilityReport to validate the complete
ReliabilityReport contract, including the allowed riskLevel values, required
assumptions and rolloutSteps arrays, and the required nested fields in
idempotencyPlan, retryPlan.schedule, deadLetterPlan, and observability. Ensure
every required field has the expected type and structure so parseReport returns
a report only when fully valid, preventing incomplete data from reaching the
success response.
In `@kits/webhook-reliability-architect/apps/app/page.tsx`:
- Around line 95-97: Update the scrollIntoView call in the requestAnimationFrame
callback to choose "auto" when matchMedia("(prefers-reduced-motion: reduce)")
matches, and "smooth" otherwise, preserving the existing scroll target and
behavior.
- Around line 102-107: Update copyReport to catch failures from
navigator.clipboard.writeText and expose a copy-failure status through the
existing component state/UI. Set the success state and timeout only after the
write succeeds, while ensuring rejected clipboard promises are handled without
becoming unhandled rejections.
In `@kits/webhook-reliability-architect/apps/lib/demo.ts`:
- Line 123: In kits/webhook-reliability-architect/apps/lib/demo.ts lines
123-123, update the hasIdempotency detection to count protection only when
currentSafeguards explicitly describes persisted idempotency or deduplication;
do not treat generic event or payload identifiers as evidence. In the
identifier-selection logic at lines 140-143, use the sampled identifier only
when it is explicitly an event identifier; otherwise use the safe
<provider-event-id> fallback and state that assumption.
In `@kits/webhook-reliability-architect/apps/package.json`:
- Around line 11-22: Update kits/webhook-reliability-architect/apps/package.json
lines 11-22 to add Tailwind CSS v4+, react-hook-form, and zod. In
kits/webhook-reliability-architect/apps/app/page.tsx lines 75-100, replace
manual form state and validation with a Zod schema integrated through
react-hook-form while preserving the form’s behavior. In
kits/webhook-reliability-architect/apps/app/globals.css lines 68-96, replace
component-specific CSS with Tailwind utility-based styling and retain only
necessary global CSS variables; do not add shadcn/ui.
In `@kits/webhook-reliability-architect/flows/webhook-reliability-architect.ts`:
- Line 74: Update the Studio schema in the flow artifact so analysis and its
required ReliabilityReport fields—executiveSummary, riskScore, riskLevel,
idempotencyPlan, retryPlan, deadLetterPlan, observability, failureModes,
testMatrix, and rolloutSteps—are listed in required arrays. Constrain riskLevel
to the supported values low, moderate, high, and critical instead of accepting
arbitrary strings, then re-export the updated flow artifact.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI (base), Organization UI (inherited)
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: a64bf63d-5096-4f6e-beac-77fd85d49a4b
⛔ Files ignored due to path filters (1)
kits/webhook-reliability-architect/apps/package-lock.jsonis excluded by!**/package-lock.json
📒 Files selected for processing (25)
kits/webhook-reliability-architect/.env.examplekits/webhook-reliability-architect/.gitignorekits/webhook-reliability-architect/README.mdkits/webhook-reliability-architect/agent.mdkits/webhook-reliability-architect/apps/.env.examplekits/webhook-reliability-architect/apps/.gitignorekits/webhook-reliability-architect/apps/AGENTS.mdkits/webhook-reliability-architect/apps/CLAUDE.mdkits/webhook-reliability-architect/apps/actions/orchestrate.tskits/webhook-reliability-architect/apps/app/globals.csskits/webhook-reliability-architect/apps/app/layout.tsxkits/webhook-reliability-architect/apps/app/page.tsxkits/webhook-reliability-architect/apps/lib/demo.tskits/webhook-reliability-architect/apps/lib/lamatic-client.tskits/webhook-reliability-architect/apps/lib/types.tskits/webhook-reliability-architect/apps/next-env.d.tskits/webhook-reliability-architect/apps/next.config.mjskits/webhook-reliability-architect/apps/package.jsonkits/webhook-reliability-architect/apps/tsconfig.jsonkits/webhook-reliability-architect/constitutions/default.mdkits/webhook-reliability-architect/flows/webhook-reliability-architect.tskits/webhook-reliability-architect/lamatic.config.tskits/webhook-reliability-architect/model-configs/webhook-reliability-architect_instructor-llmnode-437_generative-model-name.tskits/webhook-reliability-architect/prompts/webhook-reliability-architect_instructor-llmnode-437_system_0.mdkits/webhook-reliability-architect/prompts/webhook-reliability-architect_instructor-llmnode-437_user_1.md
|
Hi @amarkumar00! 👋 Before this PR can be reviewed by maintainers, please resolve all comments and requested changes from the CodeRabbit automated review. Steps to follow:
This helps keep the review process efficient for everyone. Thank you! 🙏 |
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
kits/webhook-reliability-architect/apps/actions/orchestrate.ts (1)
80-87: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick winMission brief — enforce the requested retry bounds on live reports.
isReliabilityReportaccepts any positiveretryPlan.maxAttemptsandmaxDeliveryAgeMinutes. A model response can exceed the validated scenario limits and still returnsuccess: true. The UI will then present an unsafe retry plan as a supported live report.Compare the parsed report with
validScenariobefore success. Reject a report when its attempt count, delivery-age budget, or schedule attempt count exceeds the requested bounds.Proposed guard
+function respectsScenarioBounds( + report: ReliabilityReport, + scenario: WebhookScenario, +): boolean { + return ( + report.retryPlan.maxAttempts <= scenario.maxAttempts && + report.retryPlan.maxDeliveryAgeMinutes <= scenario.maxDeliveryAgeMinutes && + report.retryPlan.schedule.length <= scenario.maxAttempts && + report.retryPlan.schedule.every((step) => step.attempt <= scenario.maxAttempts) + ); +} + const report = parseReport(response); - if (!report) { + if (!report || !respectsScenarioBounds(report, validScenario)) { return { success: false, - error: "Lamatic returned an unexpected response shape. Verify the deployed flow output schema.", + error: "Lamatic returned a report outside the requested delivery bounds.", }; }🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@kits/webhook-reliability-architect/apps/actions/orchestrate.ts` around lines 80 - 87, Before returning success in the parseReport flow, validate the parsed report against validScenario’s requested retry limits. Reject reports whose retryPlan.maxAttempts, maxDeliveryAgeMinutes, or schedule attempt count exceeds the corresponding scenario bounds, while preserving the existing invalid-report failure behavior.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@kits/webhook-reliability-architect/apps/actions/orchestrate.ts`:
- Around line 77-79: Update the orchestration path before client.executeFlow to
enforce the sensitive-data policy on validScenario: redact prohibited credential
or personal-data values, or reject the request when they are detected. Ensure
samplePayload, failureContext, and currentSafeguards cannot reach the live flow
unfiltered, independent of client-side warnings.
---
Outside diff comments:
In `@kits/webhook-reliability-architect/apps/actions/orchestrate.ts`:
- Around line 80-87: Before returning success in the parseReport flow, validate
the parsed report against validScenario’s requested retry limits. Reject reports
whose retryPlan.maxAttempts, maxDeliveryAgeMinutes, or schedule attempt count
exceeds the corresponding scenario bounds, while preserving the existing
invalid-report failure behavior.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI (base), Organization UI (inherited)
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 40b22f4a-d567-46de-bb7b-728fecca0dcc
⛔ Files ignored due to path filters (1)
kits/webhook-reliability-architect/apps/package-lock.jsonis excluded by!**/package-lock.json
📒 Files selected for processing (11)
kits/webhook-reliability-architect/README.mdkits/webhook-reliability-architect/apps/.gitignorekits/webhook-reliability-architect/apps/actions/orchestrate.tskits/webhook-reliability-architect/apps/app/globals.csskits/webhook-reliability-architect/apps/app/page.tsxkits/webhook-reliability-architect/apps/lib/demo.tskits/webhook-reliability-architect/apps/lib/schemas.tskits/webhook-reliability-architect/apps/lib/types.tskits/webhook-reliability-architect/apps/package.jsonkits/webhook-reliability-architect/apps/postcss.config.mjskits/webhook-reliability-architect/flows/webhook-reliability-architect.ts
|
/validate |
|
📡 Running Studio validation — results will appear here shortly. |
Studio Runtime Validation (Phase 2)✅ Studio validation passed. The kit loaded successfully in Lamatic Studio. This PR is ready for final review and merge. |
|
@amarkumar00 test 2 is failing, please check the above |
|
/validate |
|
📡 Running Studio validation — results will appear here shortly. |
|
Hi Akshat,
Thank you for pointing out the Studio validation issue.
I replaced the flow with the official Lamatic Studio export and pushed the
fix. Studio Phase 2 validation, structural checks, and CodeRabbit review
are now passing.
PR: #334
Could you please review it again when convenient?
Thanks,
Amar Kumar
…On Tue, 11 Aug 2026 at 19:20, Akshat Virmani ***@***.***> wrote:
*akshatvirmani* left a comment (Lamatic/AgentKit#334)
<#334 (comment)>
@amarkumar00 <https://github.com/amarkumar00> test 2 is failing, please
check the above
—
Reply to this email directly, view it on GitHub
<#334?email_source=notifications&email_token=BA5UQN5HGLDYM2B2VQO2TYL5JMQEFA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTKMRVGQYDOMJRGM4KM4TFMFZW63VHNVSW45DJN5XKKZLWMVXHJLDGN5XXIZLSL5RWY2LDNM#issuecomment-5254071138>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BA5UQN5X223ODQOXYJWVOOL5JMQEFAVCNFSNUABGKJSXA33TNF2G64TZHMYTANRXGY2TCNJUGE5US43TOVSTWNJQHE3TENJRGI3TRILWAI>
.
Triage notifications, keep track of coding agent tasks and review pull
requests on the go with GitHub Mobile for iOS
<https://github.com/notifications/mobile/ios/BA5UQN4EEIITAYVIUCUJ5NT5JMQEFA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTKMRVGQYDOMJRGM4KM4TFMFZW63VHNVSW45DJN5XKKZLWMVXHJKTGN5XXIZLSL5UW64Y>
and Android
<https://github.com/notifications/mobile/android/BA5UQNZRLDUDBIKDEX4RGVD5JMQEFA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTKMRVGQYDOMJRGM4KM4TFMFZW63VHNVSW45DJN5XKKZLWMVXHJLTGN5XXIZLSL5QW4ZDSN5UWI>.
Download it today!
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
|
/validate |
|
📡 Running Studio validation — results will appear here shortly. |
Summary
Why
Webhook redelivery, lost acknowledgements, concurrent duplicates, and poison payloads can repeat real business side effects. This kit turns a sanitized delivery scenario into a concrete, reviewable reliability blueprint instead of generic retry advice.
Validation
npm run typechecknpm run buildnpm audit --audit-level=high— 0 vulnerabilities@referencepaths resolve.env.localfile is committedScope
All changes are contained in
kits/webhook-reliability-architect/.kits/webhook-reliability-architect/.README.md,agent.md, andconstitutions/default.mdwith setup guidance, operating rules, safety boundaries, output requirements, and failure-mode guidance.lamatic.config.ts.flows/webhook-reliability-architect.ts.model-configs/.prompts/.apps/.